package com.lsm.sm.entity;

/**
 * User entity. @author MyEclipse Persistence Tools
 */

public class User extends Model {
	
	private static final long serialVersionUID = -3064227375937079563L;
	// Fields
	private String proxyId;
	private String proxyName;
	
	private String account;		
	private String name;		
	private String nickname;	
	private String password;	
	private String email;		
	private String phone;		
	private String qq;			
	private String msn;			
	private Integer sex;		
	private Long birth;			
	private Integer age;		
	private String picture;		
	private Short infoLevel;		
	private Short level;		
	
	
	
	// Constructors
	/** default constructor */
	public User() {}

	public User( String email, String password ) {
		this.password = password;
		this.email = email;
	}

	// Property accessors
	public String getProxyId() {
		return proxyId;
	}

	public void setProxyId(String proxyId) {
		this.proxyId = proxyId;
	}

	public String getProxyName() {
		return proxyName;
	}

	public void setProxyName(String proxyName) {
		this.proxyName = proxyName;
	}

	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNickname() {
		return this.nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getMsn() {
		return this.msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}

	public Integer getSex() {
		
		return this.sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Long getBirth() {
		
		return this.birth;
	}

	public void setBirth(Long birth) {
		this.birth = birth;
	}

	public Integer getAge() {
		
		return this.age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getPicture() {
		return this.picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	public Short getInfoLevel() {
		
		return this.infoLevel;
	}

	public void setInfoLevel(Short infoLevel) {
		this.infoLevel = infoLevel;
	}
	
	public Short getLevel() {
		return this.level;
	}
	
	public void setLevel(Short level) {
		this.level = level;
	}

	@Override
	public int hashCode() {
		return id;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		User other = (User) obj;
		return id == other.id;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", name=" + name + ", password=" + password
				+ ", email=" + email + ", phone=" + phone + ", sex=" + sex
				+ ", age=" + age + "]";
	}
	
	public void test( Model model ){
		model.setId( 2 );
	}
	
	public static void main(String[] args) {
		User user = new User();
		user.setId( 1 );
		
		user.test( user );
		System.out.println( user.id );
	}
}